import { lazy, Suspense } from 'react'
import { createBrowserRouter } from 'react-router-dom'
const Home = lazy(() => import('@/views/pages/Home/index'))
const About = lazy(() => import('@/views/pages/About/index'))
const routes = [
    {
        path: '/home',
        element: <Suspense fallback={<div>loading...</div>}>
            <Home />
        </Suspense>
    },
    {
        path: '/about',
        element: <Suspense fallback={<div>loading...</div>}>
            <About />
        </Suspense>
    }
]
const router = createBrowserRouter(routes)
export default router